//This is the piece class. It will contain the x and y position, and the glDraw of it's color.
//it will contain it's color of owner (default is red), and the player class will have a bunch of pieces set to it's color.
//When a player clicks on a piece, it will first check to see if the current player who's playing has clicked a piece of
//the same color.If so, they can move it. Else, they won't. -Matt
#pragma once
#include "Cell.h" //There is a reason I'm including the cell class. Each piece will take care of it's OWN move function.
#include "Map.h"

class Piece
{
private:
	int colorOfOwner; //This can be a char too, it doesn't really matter.
	float x, y;
	bool selected;
	bool drawed;
	Cell currentPos;
public:
	Piece(int color, int ex, int why) {colorOfOwner = color; x = ex; y = why; selected = false; drawed = true;} //I set drawed to true here, because it already has a value.
	Piece() {colorOfOwner = 0; x = y = 0; selected = false; drawed = false;} //0 is red, 1 is green, 2 is yellow, 3 is blue. But not here, because it's just there.
	void move(Cell);
	float getX() {return x;}
	float getY() {return y;}
	int getColor() {return colorOfOwner;}
	void setPos(float ex, float why) {x = ex; y = why;}
	void setColor(int color) {colorOfOwner = color;}
	void move(float , float);
	void glDraw();
	void select() {selected = true;}
	void deSelect() {selected = false;}
	bool getSelect() {return selected;}
	bool getDraw() {return drawed;}
	void showNextPossibleMoves(Cell&, Map&);
	Cell & getCurrentPos() {return currentPos; }
	void setDraw(bool draw) {drawed = draw;}
};
